package com.weasing.res.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.weasing.res.dao.IWxRegionDao;
import com.weasing.res.dao.base.impl.BaseDaoImpl;
import com.weasing.res.domain.WxRegion;

@Repository
public class WxRegionDaoImpl extends BaseDaoImpl<WxRegion> implements
		IWxRegionDao {

	@Override
	public List<WxRegion> findWxRegionByCondition(int parentId, int regionType) {
		String hql = "from WxRegion wr where wr.parentId = ? and wr.regionType = ?";
		List<WxRegion> wxRegions = (List<WxRegion>) this.getHibernateTemplate()
				.find(hql, parentId, regionType);
		return wxRegions;
	}

}
